package com.bravo.mvpkotlin.base

import android.app.Application
import com.bravo.mvpkotlin.data.source.DataSourceModule

/**
 * Created by Administrator on 2017/6/21 0021.
 */

class BaseApp:Application(){

    lateinit private var appComponent:AppComponent
    companion object{
        lateinit  var app:BaseApp
        fun getApplication():BaseApp{
            return app
        }
    }

    override fun onCreate() {
        super.onCreate()
        app = this
        appComponent=   DaggerAppComponent.builder().dataSourceModule(DataSourceModule()).build()
    }

    fun getAppComponent():AppComponent = appComponent
}